home *** CD-ROM | disk | FTP | other *** search
/ Supercompiler 1997 / SUPERCOMPILER97.iso / Delphi 3.0 / DATA.Z / SERVMAIN.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1997-01-30  |  1.2 KB  |  54 lines

  1. unit ServMain;
  2.  
  3. {
  4.   This program represents the "Application Server" portion of the
  5.   distributed datasets demo.  The other part is the client which will access
  6.   the data provided by this server.  You must compile and run this program
  7.   once before running the EmpEdit project.
  8. }
  9.  
  10. interface
  11.  
  12. uses
  13.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  14.   ExtCtrls, StdCtrls, Grids, DBGrids, Db;
  15.  
  16. type
  17.   TMainForm = class(TForm)
  18.     Panel1: TPanel;
  19.     QueryCount: TLabel;
  20.     ClientCount: TLabel;
  21.   private
  22.     FQueryCount: Integer;
  23.     FClientCount: Integer;
  24.   public
  25.     procedure UpdateClientCount(Incr: Integer);
  26.     procedure IncQueryCount;
  27.   end;
  28.  
  29. var
  30.   MainForm: TMainForm;
  31.  
  32. implementation
  33.  
  34. {$R *.DFM}
  35.  
  36. { These procedures update the display of the Application Server form for
  37.   the purposes of this demo.  A typical Application Server would probably
  38.   not have any visible UI. }
  39.  
  40. procedure TMainForm.UpdateClientCount(Incr: Integer);
  41. begin
  42.   FClientCount := FClientCount + Incr;
  43.   ClientCount.Caption := IntToStr(FClientCount);
  44. end;
  45.  
  46. procedure TMainForm.IncQueryCount;
  47. begin
  48.   Inc(FQueryCount);
  49.   QueryCount.Caption := IntToStr(FQueryCount);
  50. end;
  51.  
  52.  
  53. end.
  54.